/* -------------------------------------------------------------------------- *
   TestWinUnit - Maria Blees (maria.blees@microsoft.com)

   File: TestResultsTest.cpp

   This file contains tests for TestResults.
 * -------------------------------------------------------------------------- */

#include "WinUnit.h"
#include "TestResults.h"

using namespace WinUnitLib;

BEGIN_TEST(TestResultsConstructor)
{
    TestResults testResults;
    WIN_ASSERT_ZERO(testResults.SucceededCount);
    WIN_ASSERT_ZERO(testResults.TotalRunCount);
}
END_TEST

BEGIN_TEST(TestResultsOperatorPlusEquals)
{
    TestResults testResults1;
    testResults1.TotalRunCount = 5;
    testResults1.SucceededCount = 3;

    TestResults testResults2;
    testResults2.TotalRunCount = 6;
    testResults2.SucceededCount = 6;

    testResults1 += testResults2;
    WIN_ASSERT_EQUAL(11U, testResults1.TotalRunCount);
    WIN_ASSERT_EQUAL(9U, testResults1.SucceededCount);
}
END_TEST